package com.my.fp.list;

import java.util.Arrays;
import java.util.List;

/**
 * @author: marshal
 * @date: 2022-07-22 15:16
 */
public class ListAllMatchTest {
    public static void main(String[] args) {
        String str = "1,2,3";
        String str2 = "1,2,3,10";
        var nums2 = List.of(1,2,3,4,5);
        System.out.println(Arrays.stream(str.split(",")).map(Integer::valueOf).allMatch(nums2::contains));
        System.out.println(Arrays.stream(str2.split(",")).map(Integer::valueOf).allMatch(nums2::contains));
    }
}
